refs: Don't try searching for input strings that can't be objects
authorColin Walters <walters@verbum.org>
Wed, 23 Jul 2014 19:09:24 +0000 (15:09 -0400)
committerColin Walters <walters@verbum.org>
Wed, 23 Jul 2014 19:09:24 +0000 (15:09 -0400)
commitd5e813c52c324157c51ac96b1c162d167a5d48fb
tree60cd5fb15b694f00c1b93326b84613378cf97685
parent9bd229dff58ddb96f08e9307a1a668efc3548db5
refs: Don't try searching for input strings that can't be objects

I noticed OSTree was a bit slower, did some investigation
and saw we were enumerating all objects for things like

$ ostree rev-parse blah

Since "blah" can never be an object (because of the 'l' and 'h'), just
return no matches.
src/libostree/ostree-repo-refs.c